package com.qf.pojo;

/**
 * Created by Administrator on 2021/10/25.
 */
public class PageBean {
    private int page; //当前页
    private int rowsPerPage;//每页行数
    private int rowsNum;//总行数
    private int pageNum;// 总页数

    private boolean hasPre;//前一页
    private boolean hasNext;//后一页
    private boolean isFirst;//首页
    private boolean isLast;//末页


    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRowsPerPage() {
        return rowsPerPage;
    }

    public void setRowsPerPage(int rowsPerPage) {
        this.rowsPerPage = rowsPerPage;
    }

    public int getRowsNum() {
        return rowsNum;
    }

    public void setRowsNum(int rowsNum) {
        this.rowsNum = rowsNum;
        pageNum=rowsNum/rowsPerPage;//总行数/每页行数  4/3
        if(rowsNum%rowsPerPage!=0)//总行数/每页行数 结果不能整除时，总页码加1
            pageNum++;
    }

    public int getPageNum() {
        return pageNum;
    }


    public boolean isHasPre() {
        return hasPre;
    }

    public void setHasPre(boolean hasPre) {
        this.hasPre = hasPre;
    }

    public boolean isHasNext() {
        return hasNext;
    }

    public void setHasNext(boolean hasNext) {
        this.hasNext = hasNext;
    }

    public boolean isFirst() {
        return isFirst;
    }

    public void setFirst(boolean first) {
        isFirst = first;
    }

    public boolean isLast() {
        return isLast;
    }

    public void setLast(boolean last) {
        isLast = last;
    }
}
